/* 执行结果摘要 */
.result-summary {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--color-bg-primary);
  border-radius: 12px;
  border: 2px solid var(--color-border);
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 2px solid;
}

.summary-item.success {
  background: linear-gradient(135deg, rgba(81, 207, 102, 0.2), rgba(81, 207, 102, 0.1));
  color: var(--color-accent-success);
  border-color: var(--color-accent-success);
}

.summary-item.failed {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 107, 107, 0.1));
  color: #ff6b6b;
  border-color: #ff6b6b;
}

.summary-icon {
  font-size: 16px;
}

/* 卡片底部 */
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: #fef5f8;
  border-top: 1px solid var(--color-border);
}

.job-type-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 2px solid;
}

.job-type-badge.type-playbook {
  background: linear-gradient(135deg, rgba(18, 202, 214, 0.2), rgba(18, 202, 214, 0.1));
  color: var(--color-accent-blue);
  border-color: var(--color-accent-blue);
}

.job-type-badge.type-adhoc {
  background: linear-gradient(135deg, rgba(255, 169, 77, 0.2), rgba(255, 169, 77, 0.1));
  color: var(--color-accent-orange);
  border-color: var(--color-accent-orange);
}

.btn-detail {
  padding: 8px 18px;
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.1), rgba(196, 113, 237, 0.1));
  border: 2px solid rgba(255, 107, 157, 0.3);
  border-radius: 12px;
  color: #ff6b9d;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-detail:hover {
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.2), rgba(196, 113, 237, 0.2));
  border-color: #ff6b9d;
  transform: translateX(4px);
}

/* 状态徽章 */
.status-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 2px solid;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-badge.status-pending {
  background: linear-gradient(135deg, rgba(108, 117, 137, 0.2), rgba(108, 117, 137, 0.1));
  color: var(--color-text-secondary);
  border-color: var(--color-text-secondary);
}

.status-badge.status-running {
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.2), rgba(196, 113, 237, 0.1));
  color: var(--color-accent-pink);
  border-color: var(--color-accent-pink);
}

.status-badge.status-success {
  background: linear-gradient(135deg, rgba(81, 207, 102, 0.2), rgba(81, 207, 102, 0.1));
  color: var(--color-accent-success);
  border-color: var(--color-accent-success);
}

.status-badge.status-failed {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 107, 107, 0.1));
  color: #ff6b6b;
  border-color: #ff6b6b;
}

.status-badge.status-canceled {
  background: linear-gradient(135deg, rgba(108, 117, 137, 0.2), rgba(108, 117, 137, 0.1));
  color: var(--color-text-secondary);
  border-color: var(--color-text-secondary);
}

/* 详情弹窗 */
.modal-content.large {
  max-width: 900px;
  max-height: 90vh;
}

.modal-header .header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-header .header-info h3 {
  margin: 0;
  font-size: 20px;
}

.modal-header .job-id {
  padding: 4px 10px;
  background: rgba(255, 107, 157, 0.1);
  border-radius: 12px;
  font-size: 12px;
  color: #ff6b9d;
  font-family: monospace;
}

.detail-section {
  margin-bottom: 24px;
}

.detail-section h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 700;
  color: #ff6b9d;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-item .label {
  font-size: 12px;
  color: var(--color-text-secondary);
  font-weight: 600;
}

.info-item .value {
  font-size: 14px;
  color: var(--color-text-primary);
  font-weight: 600;
}

/* 主机执行结果 */
.host-results {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.host-result-card {
  background: var(--color-bg-primary);
  border: 2px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
}

.host-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fef5f8 0%, #fff0f6 100%);
  border-bottom: 2px solid var(--color-border);
}

.host-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.host-icon {
  font-size: 20px;
}

.host-name .name {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.host-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 2px solid;
}

.host-status.success {
  background: linear-gradient(135deg, rgba(81, 207, 102, 0.2), rgba(81, 207, 102, 0.1));
  color: var(--color-accent-success);
  border-color: var(--color-accent-success);
}

.host-status.failed {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 107, 107, 0.1));
  color: #ff6b6b;
  border-color: #ff6b6b;
}

.host-result-output {
  padding: 16px;
}

.host-result-output.error {
  background: rgba(255, 107, 107, 0.05);
}

.output-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent-blue);
  margin-bottom: 10px;
}

.host-result-output.error .output-header {
  color: #ff6b6b;
}

.output-content {
  background: rgba(0, 0, 0, 0.2);
  padding: 12px;
  border-radius: 8px;
  color: var(--color-accent-blue);
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
}

.host-result-output.error .output-content {
  color: #ff6b6b;
}

/* 输出文本 */
.output-text {
  background: var(--color-bg-primary);
  padding: 16px;
  border-radius: 12px;
  color: var(--color-accent-blue);
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
  border: 2px solid var(--color-border);
  max-height: 400px;
  overflow-y: auto;
}

.output-text.error {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.05);
}

/* 响应式 */
@media (max-width: 768px) {
  .jobs-grid {
    grid-template-columns: 1fr;
  }
  
  .job-meta {
    grid-template-columns: 1fr;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-content.large {
    width: 95%;
    max-height: 95vh;
  }
}
